package com.zjb.demo.system.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.keygen.KeyGenerators;
import com.zjb.demo.common.listener.BaseOnListener;
import com.zjb.demo.common.domain.dto.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.noear.solon.validation.annotation.NotBlank;
import org.noear.solon.validation.annotation.Size;

import java.io.Serial;

/**
 * 字典数据表
 *
 * @author 庄佳彬
 * @since 2023/12/28 09:08
 */
@ApiModel(value = "SysDictData", description = "字典数据表")
@Table(value = "sys_dict_data", onInsert = BaseOnListener.class, onUpdate = BaseOnListener.class)
public class SysDictData extends BaseEntity {
    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 字典编码
     */
    @Id(keyType = KeyType.Generator, value = KeyGenerators.flexId)
    @Column(value = "dict_code")
    @ApiModelProperty(value = "字典编码")
    @ExcelProperty(value = "字典编码")
    private Long dictCode;

    /**
     * 字典排序
     */
    @Column(value = "dict_sort")
    @ApiModelProperty(value = "字典排序")
    @ExcelProperty(value = "字典排序")
    private Long dictSort;

    /**
     * 字典标签
     */
    @Column(value = "dict_label")
    @ApiModelProperty(value = "字典标签")
    @NotBlank(message = "字典标签不能为空")
    @Size(max = 100, message = "字典标签长度不能超过100个字符")
    @ExcelProperty(value = "字典标签")
    private String dictLabel;

    /**
     * 字典键值
     */
    @Column(value = "dict_value")
    @ApiModelProperty(value = "字典键值")
    @NotBlank(message = "字典键值不能为空")
    @Size(max = 100, message = "字典键值长度不能超过100个字符")
    @ExcelProperty(value = "字典键值")
    private String dictValue;

    /**
     * 字典类型
     */
    @Column(value = "dict_type")
    @ApiModelProperty(value = "字典类型")
    @NotBlank(message = "字典类型不能为空")
    @Size(max = 100, message = "字典类型长度不能超过100个字符")
    @ExcelProperty(value = "字典类型")
    private String dictType;

    /**
     * 样式属性（其他样式扩展）
     */
    @Column(value = "css_class")
    @ApiModelProperty(value = "样式属性（其他样式扩展）")
    @Size(max = 100, message = "样式属性长度不能超过100个字符")
    private String cssClass;

    /**
     * 表格字典样式
     */
    @Column(value = "list_class")
    @ApiModelProperty(value = "表格字典样式")
    private String listClass;

    /**
     * 是否默认（Y是 N否）
     */
    @Column(value = "is_default")
    @ApiModelProperty(value = "是否默认（Y是 N否）")
    @ExcelProperty(value = "是否默认")
    private String isDefault;

    /**
     * 状态（0正常 1停用）
     */
    @Column(value = "status")
    @ApiModelProperty(value = "状态（0正常 1停用）")
    @ExcelProperty(value = "状态")
    private String status;

    public Long getDictCode() {
        return dictCode;
    }

    public void setDictCode(Long dictCode) {
        this.dictCode = dictCode;
    }

    public Long getDictSort() {
        return dictSort;
    }

    public void setDictSort(Long dictSort) {
        this.dictSort = dictSort;
    }

    public String getDictLabel() {
        return dictLabel;
    }

    public void setDictLabel(String dictLabel) {
        this.dictLabel = dictLabel;
    }

    public String getDictValue() {
        return dictValue;
    }

    public void setDictValue(String dictValue) {
        this.dictValue = dictValue;
    }

    public String getDictType() {
        return dictType;
    }

    public void setDictType(String dictType) {
        this.dictType = dictType;
    }

    public String getCssClass() {
        return cssClass;
    }

    public void setCssClass(String cssClass) {
        this.cssClass = cssClass;
    }

    public String getListClass() {
        return listClass;
    }

    public void setListClass(String listClass) {
        this.listClass = listClass;
    }

    public String getIsDefault() {
        return isDefault;
    }

    public void setIsDefault(String isDefault) {
        this.isDefault = isDefault;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
